import {getRequest,postRequest,putRequest,deleteRequest} from  '../utils/axios'
import * as method from './APIconfig'

let vue = {};

for(let get in method.get){
    vue['$'+get+'get']= (params)=>{
        return getRequest(method.get[get],params)
    }
}
for(let post in method.post){
    vue['$'+post] = vue['$'+post+'post']= (params)=>{
        return postRequest(method.post[post],params)
    }
}
for(let put in method.put){
    vue['$'+put+'put']= (params)=>{
        return putRequest(method.put[put],params)
    }
}
for(let del in method.del){
    vue['$'+del+'del']= (params)=>{
        return deleteRequest(method.get[del],params)
    }
}

export default vue
